<?php
class CustomerWebUser extends CWebUser
{      
    public $customer;
    
    public function init(){
        parent::init();    
        if($this->id){
            $this->customer = Customer::model()->findByPk($this->id);
            if(!$this->customer || $this->customer->isDisable) $this->logout();
        }
    }
}
?>
